package com.platform.feign.spring.common;

import java.io.Serializable;

/**
 * Description: 服务器到客户端的Json返回值
 * Author: hanguixian
 * CreateDate: 2019/09/06 18:05
 * Modified by:
 */
public class JsonResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private String code = "500";

    private String desc = "";

    private T data;

    public JsonResult() {
    }

    public JsonResult(String code, String desc) {
        this.code = code;
        this.desc = desc;
        this.data = null;
    }

    public JsonResult(String code, String desc, T data) {
        this.code = code;
        this.desc = desc;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}